Skip to content

Conversation

@drlucaa
Copy link
Member

@drlucaa drlucaa commented Jan 24, 2026

Closes #52

- Replace tea.Program with ports.Renderer in Bridge and OTelTracer
- Update WithProgram() -> WithRenderer()
- Call renderer.OnTaskLog() instead of program.Send()
- Update all tests to use mockRenderer instead of mocking tea.Program
- Fix test assertions to use assert.Positive per linter
- Add OutputMode field to RunOptions
- Remove log file redirection to .same/debug.log
- Implement environment detection and renderer selection (TUI vs Linear)
- Update telemetry setup to use Bridge with ports.Renderer
- Simplify concurrent execution lifecycle (remove manual cancel)
- Remove obsolete TestApp_Run_LogSetupFailure test
- Generate mocks for ports package
- Add --output-mode/-o flag with choices: auto, tui, linear
- Add --ci flag as shorthand for --output-mode=linear
- Wire OutputMode to app.RunOptions
- Default to auto mode (environment-based detection)
Task output now flows exclusively through the OpenTelemetry span →
renderer
pipeline. The logger in the shell executor was creating duplicate
output:
once via slog (unformatted) and once via the renderer (formatted with
[TaskName] prefixes).

Removed:
- Executor.logger field
- logWriter type and methods
- MultiWriter wrapping of stdout/stderr
- Logger dependency from shell adapter node
- Logger mocks from all executor tests
- Add color palette with 8 visually distinct colors
- Implement hash-based color assignment for deterministic task colors
- Apply task color to log prefixes [taskName] in all outputs
- Colorize task name in completion messages while preserving symbol
colors
- Add tests for color assignment consistency and distribution
@drlucaa drlucaa force-pushed the refactor/unified-otel-telemetry branch from d0d0572 to b5bb3ff Compare January 24, 2026 00:17
- Import ports package in scheduler tests
- Cast MockSpan to ports.Span interface in Return() calls
- Regenerate mocks to include MarkExecStart() method
- All tests now pass with -race flag
- Remove logger from shell.NewExecutor()
- Replace tea.Program with Renderer interface
- Simplify MarkExecStart() to only add OTel event
- Update tests to use mockRenderer
@codecov
Copy link

codecov bot commented Jan 24, 2026

- Add comprehensive tests for TUI renderer (lifecycle, events, error
handling)
- Add tests for linear renderer edge cases (nil writers, unknown spans,
buffer flushing)
- Add tests for telemetry bridge with OTel SDK tracers
- Add tests for app layer linear mode and inspect mode
- Add table-driven tests for run command output mode flags
- Add mockgen directive for Renderer interface
- Refactor duplicate test code to use table-driven pattern
@drlucaa drlucaa changed the title Refactor/unified otel telemetry refactor(#52): Unified OpenTelemetry Pipeline & CI Console Bridge Jan 24, 2026
@drlucaa drlucaa merged commit 21cf7b4 into main Jan 24, 2026
6 checks passed
@drlucaa drlucaa deleted the refactor/unified-otel-telemetry branch January 24, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Unified OpenTelemetry Pipeline & CI Console Bridge

2 participants